package com.groupnections.server.database.entities;

import java.util.List;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.groupnections.client.Entities.EntitiesDatabaseServerCalls;
import com.groupnections.shared.Entity;

/**
 * 
 * @Architecture
 */
@SuppressWarnings("serial")
public class EntitiesDatabaseImplementation extends RemoteServiceServlet
		implements EntitiesDatabaseServerCalls {

	@Override
	public Entity getEntity(String entityID) {

		return GetEntity.get(entityID);
	}

	@Override
	public List<Entity> listEntities() {

		return ListEntities.list();
	}

	@Override
	public void saveEntity(Entity entity) {

		SaveEntity.save(entity);
	}

	@Override
	public void connectEntity(Entity entity, String entityID) {

		ConnectEntity.save(entity, entityID);
	}
}
